﻿using Nuclear.Models.DbModels;

namespace Nuclear.Services;
public interface IDbService
{
    void CreateDatabaseAndTables();
    Task<List<ConsumeCode>> GetConsumeCodeAsync(
        string systemId,
        string? merchantId = null,
        string? productId = null,
        string? userId = null,
        string? benefitsCardNo = null,
        string? districtId = null,
        string? code = null,
        bool? isUsed = null,
        CancellationToken token = default
    );
    Task AddConsumeCodeAsync(ConsumeCode consumeCode, CancellationToken token = default);
    Task AddConsumeCodesAsync(List<ConsumeCode> consumeCodes, CancellationToken token = default);
    Task UpdateConsumeCodesAsync(ConsumeCode consumeCode, CancellationToken token = default);

    Task<List<SoftwareSystem>> GetAllSoftwareSystemsAsync(CancellationToken token = default);
    Task<SoftwareSystem?> GetSoftwareSystemAsync(string systemId, CancellationToken token = default);
    Task AddSoftwareSystemAsync(SoftwareSystem system, CancellationToken token = default);
    Task AddSoftwareSystemsAsync(List<SoftwareSystem> systems, CancellationToken token = default);

    Task<CrmebSystemAdmin?> LoginAsCrmebMerchantAsync(string userName, string password, CancellationToken token = default);
}